![]() |
PATH![]() |
![]() ![]() |
Applies a theme-compliant color or pattern to the foreground of the current port.
pascal OSStatus SetThemePen (
ThemeBrush inBrush,
SInt16 inDepth,
Boolean inIsColorDevice);
Your application should call the SetThemePen function each time you wish to draw an element in a specified brush constant.
Because the constant in the inBrush parameter can represent a color or pattern, depending on the current theme, your application must save and restore the current drawing state of the graphics port around calls to SetThemePen . Under Appearance Manager 1.1 and later, you can use the functions GetThemeDrawingState and SetThemeDrawingState to do this. Prior to Appearance Manager 1.1, you must save and restore the pnPixPat and bkPixPat fields of your graphics port when saving the text and background colors. Because patterns in the pnPixPat field override the foreground color of the window, call the QuickDraw function PenPat to set your foreground pattern to a normal white pattern. This ensures that you can use RGBForeColor to set your foreground color to white, call the QuickDraw function PaintRect , and get the expected results.